package com.example;

import com.example.bean.Resume;
import com.example.repository.ResumeRepository;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class MongodbTestApplication {
    public static void main(String[] args) {
        ApplicationContext  applicationContext = SpringApplication.run(MongodbTestApplication.class,args);
        ResumeRepository  resumeRepository = applicationContext.getBean(ResumeRepository.class);

        for(int i=0;i<50;i++){
            Resume resume  = new Resume();
            resume.setName("akari"+i);
            resume.setExpectSalary(1);
            resume.setCity("bj");
            resumeRepository.save(resume);
        }

    }
}


